﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;

namespace GiveAQuizSite.Reports
{
  public partial class QuizResults : System.Web.UI.Page
  {
    protected void Page_Init(object sender, EventArgs e)
    {
      string serverUrl = Request.Url.Authority;
      if ( !String.IsNullOrWhiteSpace(Request.ApplicationPath) )
      {
        serverUrl += Request.ApplicationPath;
        if ( !Request.ApplicationPath.EndsWith("/") )
        {
          serverUrl += "/";
        }
      }
      this.ReportViewer1.LocalReport.SetParameters(
        new[] { new ReportParameter("ServerUrl", serverUrl) });
    }

    protected void Page_Load(object sender, EventArgs e)
    {
      
    }
  }
}